package cn.smbms.util;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Classname SMBMSHandlerExceptionResolver
 * @Description TODO
 * @Date 2020-10-12 10:07
 * @Created by 26440
 */
public class SMBMSHandlerExceptionResolver implements HandlerExceptionResolver {
    public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse httpServletResponse, Object o, Exception e) {
       /* System.out.println("额外的异常处理");
        request.setAttribute("exception",e);*/

        return new ModelAndView("forward:error.jsp");
    }
}
